package packet;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

import sql.UpdateDate;
import DataClass.OldClock;
import TCP.Communication.CommunicationServer;
import TCP.Communication.LinkerClient;
import TCP.Communication.LinkerServer;
import TCP.Packet.sys.Packet_i;

public class SendOldClock implements Packet_i, Serializable {
	public int id;
	private String oldNetid;

	public List<OldClock> clock = new ArrayList<OldClock>();

	@Override
	public void runOnServer(LinkerServer ls) {
		if (id == 1) {
			oldNetid = "old1";
		}

		CommunicationServer.cs.sendTo指定名稱(ls, this, new String[] { oldNetid });

	}

	@Override
	public void runOnClient(LinkerClient lc) {
		UpdateDate c = new UpdateDate();
		c.update(clock);

	}

}
